package com.uqbar.arkanoid;

import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

import com.uqbar.componentes.Fondo;
import com.uqbar.componentes.PantallaFinal;
import com.uqbar.vainilla.GameScene;

public class EndScene extends GameScene{

	private Fondo fondo;
	private PantallaFinal pantallaFinal;
	
	public EndScene(String mensaje, double x, double y) {
		
		PantallaFinal pantallaFinal = new PantallaFinal(x, y, mensaje, Color.black);
		
		BufferedImage img = null;
	    try {
	    	img = ImageIO.read(new File("fondito.PNG"));
	    }
	    catch (IOException ex) {
	    	System.out.println("No se pudo leer la imagen");
	    }
	    this.fondo = new Fondo(0, 0, img);
	    this.setFondo(fondo);
	    this.setPantallaFinal(pantallaFinal);
	}
	
	public Fondo getFondo(){
		return fondo;
	}
	
	public void setFondo(Fondo fondo){
		this.addComponent(fondo);
		this.fondo = fondo;
	}
	
	public PantallaFinal getPantallaFinal(){
		return pantallaFinal;
	}
	
	public void setPantallaFinal(PantallaFinal pantallaFinal){
		this.addComponent(pantallaFinal);
		this.pantallaFinal = pantallaFinal;
	}
	
}
